class Person<T>{
    public constructor(private _person:T){}
    public get():T{
        return this._person;
    }
}

interface PersonInterface{
    name:string;
    age:number;
}

const person = new Person<PersonInterface>({name:"后盾人",age:18});
console.log(person.get().age);